home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Borland / Borland C++ V5.02 / ENROLS2.PAK / ENROLL.CPP < prev    next >
C/C++ Source or Header  |  1997-05-06  |  4KB  |  141 lines

  1. // Enroll.cpp : Defines the class behaviors for the application.
  2. //
  3.  
  4. #include "stdafx.h"
  5. #include "Enroll.h"
  6.  
  7. #include "MainFrm.h"
  8. #include "SectSet.h"
  9. #include "coursset.h"
  10. #include "enroldoc.h"
  11. #include "SectForm.h"
  12.  
  13. #ifdef _DEBUG
  14. #define new DEBUG_NEW
  15. #undef THIS_FILE
  16. static char THIS_FILE[] = __FILE__;
  17. #endif
  18.  
  19. /////////////////////////////////////////////////////////////////////////////
  20. // CEnrollApp
  21.  
  22. BEGIN_MESSAGE_MAP(CEnrollApp, CWinApp)
  23.     //{{AFX_MSG_MAP(CEnrollApp)
  24.     ON_COMMAND(ID_APP_ABOUT, OnAppAbout)
  25.         // NOTE - the ClassWizard will add and remove mapping macros here.
  26.         //    DO NOT EDIT what you see in these blocks of generated code!
  27.     //}}AFX_MSG_MAP
  28.     // Standard print setup command
  29.     ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
  30. END_MESSAGE_MAP()
  31.  
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CEnrollApp construction
  34.  
  35. CEnrollApp::CEnrollApp()
  36. {
  37.     // TODO: add construction code here,
  38.     // Place all significant initialization in InitInstance
  39. }
  40.  
  41. /////////////////////////////////////////////////////////////////////////////
  42. // The one and only CEnrollApp object
  43.  
  44. CEnrollApp theApp;
  45.  
  46. /////////////////////////////////////////////////////////////////////////////
  47. // CEnrollApp initialization
  48.  
  49. BOOL CEnrollApp::InitInstance()
  50. {
  51.     // Standard initialization
  52.     // If you are not using these features and wish to reduce the size
  53.     //  of your final executable, you should remove from the following
  54.     //  the specific initialization routines you do not need.
  55.  
  56. #ifdef _AFXDLL
  57.     Enable3dControls();            // Call this when using MFC in a shared DLL
  58. #else
  59.     Enable3dControlsStatic();    // Call this when linking to MFC statically
  60. #endif
  61.  
  62.     LoadStdProfileSettings();  // Load standard INI file options (including MRU)
  63.  
  64.     // Register the application's document templates.  Document templates
  65.     //  serve as the connection between documents, frame windows and views.
  66.  
  67.     CSingleDocTemplate* pDocTemplate;
  68.     pDocTemplate = new CSingleDocTemplate(
  69.         IDR_MAINFRAME,
  70.         RUNTIME_CLASS(CEnrollDoc),
  71.         RUNTIME_CLASS(CMainFrame),       // main SDI frame window
  72.         RUNTIME_CLASS(CSectionForm));
  73.     AddDocTemplate(pDocTemplate);
  74.  
  75.     // Parse command line for standard shell commands, DDE, file open
  76.     CCommandLineInfo cmdInfo;
  77.     ParseCommandLine(cmdInfo);
  78.  
  79.     // Dispatch commands specified on the command line
  80.     if (!ProcessShellCommand(cmdInfo))
  81.         return FALSE;
  82.  
  83.     return TRUE;
  84. }
  85.  
  86. /////////////////////////////////////////////////////////////////////////////
  87. // CAboutDlg dialog used for App About
  88.  
  89. class CAboutDlg : public CDialog
  90. {
  91. public:
  92.     CAboutDlg();
  93.  
  94. // Dialog Data
  95.     //{{AFX_DATA(CAboutDlg)
  96.     enum { IDD = IDD_ABOUTBOX };
  97.     //}}AFX_DATA
  98.  
  99.     // ClassWizard generated virtual function overrides
  100.     //{{AFX_VIRTUAL(CAboutDlg)
  101.     protected:
  102.     virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
  103.     //}}AFX_VIRTUAL
  104.  
  105. // Implementation
  106. protected:
  107.     //{{AFX_MSG(CAboutDlg)
  108.         // No message handlers
  109.     //}}AFX_MSG
  110.     DECLARE_MESSAGE_MAP()
  111. };
  112.  
  113. CAboutDlg::CAboutDlg() : CDialog(CAboutDlg::IDD)
  114. {
  115.     //{{AFX_DATA_INIT(CAboutDlg)
  116.     //}}AFX_DATA_INIT
  117. }
  118.  
  119. void CAboutDlg::DoDataExchange(CDataExchange* pDX)
  120. {
  121.     CDialog::DoDataExchange(pDX);
  122.     //{{AFX_DATA_MAP(CAboutDlg)
  123.     //}}AFX_DATA_MAP
  124. }
  125.  
  126. BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
  127.     //{{AFX_MSG_MAP(CAboutDlg)
  128.         // No message handlers
  129.     //}}AFX_MSG_MAP
  130. END_MESSAGE_MAP()
  131.  
  132. // App command to run the dialog
  133. void CEnrollApp::OnAppAbout()
  134. {
  135.     CAboutDlg aboutDlg;
  136.     aboutDlg.DoModal();
  137. }
  138.  
  139. /////////////////////////////////////////////////////////////////////////////
  140. // CEnrollApp commands
  141.